﻿#include "todoshowitem.h"
#include "ui_todoshowitem.h"


TODOShowItem::TODOShowItem(TODOItem item, QWidget *parent):QWidget(parent),ui(new Ui::TODOShowItem)
{
    ui->setupUi(this);
    ui->label_name->setText(item.getName());
    ui->textEdit->setText(item.getExplanation());
    this->item = item;
}

TODOShowItem::~TODOShowItem()
{
    delete ui;
}

void TODOShowItem::on_textEdit_textChanged()
{
    emit this->textChange(item.getName(),item.getExplanation());
}

void TODOShowItem::on_checkBox_stateChanged(int arg1)
{
    this->chosen = arg1;
}

bool TODOShowItem::isChosen()
{
    return this->chosen;
}
